﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _7._1
{
    public abstract class Student
    {
        private string stuname;
        private int stuage;
        public static int count;
        public string StuName
        {
            get { return stuname; }
            set { stuname = value; }
        }
        public int StuAge
        {
            get
            {
                if (stuage <= 0)
                {
                    return 0;
                }
                else
                {
                    return stuage;
                }
            }
        }

        public Student(string Myname, int Myage)
        {
            this.stuname = Myname;
            this.stuage = Myage;
            count++;
        }
        public abstract double GetAverage();
    }
}
